From ba89fbd72d4557ab99182081ec2bd56ed8255e0a Mon Sep 17 00:00:00 2001 From: =?utf8?q?=D0=A0=D1=83=D1=81=D0=BB=D0=B0=D0=BD=20=D0=98=D0=B6=D0=B1?= =?utf8?q?=D1=83=D0=BB=D0=B0=D1=82=D0=BE=D0=B2?= Date: Tue, 1 Mar 2016 03:40:36 +0000 Subject: [PATCH] GDK W32: Set default cursor from our own theme right away Otherwise WM-dependent default cursor is used, which does not match our theme. Worse, later GDK will realize that we have our own left_ptr cursor and will apply it after all, making the discrepancy even more noticeable. https://bugzilla.gnome.org/show_bug.cgi?id=762902 --- gdk/win32/gdkwindow-win32.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/gdk/win32/gdkwindow-win32.c b/gdk/win32/gdkwindow-win32.c index 09db5d6d2d..c84ceb8986 100644 --- a/gdk/win32/gdkwindow-win32.c +++ b/gdk/win32/gdkwindow-win32.c @@ -138,6 +138,8 @@ _gdk_window_impl_win32_get_type (void) static void gdk_window_impl_win32_init (GdkWindowImplWin32 *impl) { + GdkDisplay *display = gdk_display_get_default (); + impl->toplevel_window_type = -1; impl->cursor = NULL; impl->hicon_big = NULL; @@ -148,6 +150,14 @@ gdk_window_impl_win32_init (GdkWindowImplWin32 *impl) impl->transient_children = NULL; impl->num_transients = 0; impl->changing_state = FALSE; + + if (display != NULL) + /* Replace WM-defined default cursor with the default cursor + * from our theme. Otherwise newly-opened windows (such as popup + * menus of all kinds) will have WM-default cursor when they are + * first shown, which will be replaced by our cursor only later on. + */ + impl->cursor = _gdk_win32_display_get_cursor_for_type (display, GDK_LEFT_PTR); } static void -- 2.30.2